#include <QWidget>
#include <QCoreApplication>
#include <QApplication>

#include "INCLUDE/MessageDispatcher.h"
#include "INCLUDE/WINDOWSEVENT.HPP"

bool SendMessage(QWidget* haWindow, const UINT Msg, const WPARAM wParam, const LPARAM lParam)
{
    WindowsEvent ev(Msg, wParam, lParam);

    return QCoreApplication::sendEvent(haWindow, &ev);
}

void PostMessage(QWidget* haWindow, const UINT Msg, const WPARAM wParam, const LPARAM lParam)
{
     auto  ev = new WindowsEvent(Msg, wParam, lParam);

     QCoreApplication::postEvent(haWindow, ev);
}

void MessageBeep(int)
{
    QApplication::beep();
}
